<ng-container *ngIf="localPkg" [ngSwitch]="localPkg.state">
  <div *ngSwitchCase="PackageState.Installed">
    <ion-text
      *ngIf="(version | compareEmver: localVersion) !== 1"
      color="primary"
    >
      Installed
    </ion-text>
    <ion-text
      *ngIf="(version | compareEmver: localVersion) === 1"
      color="success"
    >
      Update Available
    </ion-text>
  </div>
  <div *ngSwitchCase="PackageState.Removing">
    <ion-text color="danger">
      Removing
      <span class="loading-dots"></span>
    </ion-text>
  </div>
  <div *ngSwitchDefault>
    <ion-text
      *ngIf="localPkg['install-progress'] | installProgressDisplay as progress"
      color="primary"
    >
      Installing
      <span class="loading-dots"></span>
      {{ progress }}
    </ion-text>
  </div>
</ng-container>
